<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>层次选择器</title>
		<script type="text/javascript" src="../script/jquery-1.7.2.js"></script>
		<script type="text/javascript">
			$(function () {
				//获取div的所有后代input元素
				console.log($("div input"));
				//获取div的所有input子元素
				console.log($("div>input"));
			});
		</script>
	</head>
	<body>		
		<div>
			<form action="">
				<input type="text">
				<input type="text">
				<input type="text">
			</form>
			<input type="text">
		</div>
	</body>
</html>

